changed updateArticle to doEdit. This is first of a large series of changes we must...
authorYuri Astrakhan <yurik@users.mediawiki.org>
Fri, 6 Jul 2007 09:06:55 +0000 (09:06 +0000)
committerYuri Astrakhan <yurik@users.mediawiki.org>
Fri, 6 Jul 2007 09:06:55 +0000 (09:06 +0000)
includes/Article.php

index 9f3795e..0cb007a 100644 (file)
@@ -2262,7 +2262,11 @@ class Article {
                $wgOut->setRobotpolicy( 'noindex,nofollow' );
                $wgOut->addHTML( '<h2>' . htmlspecialchars( $newComment ) . "</h2>\n<hr />\n" );
 
-               $this->updateArticle( $target->getText(), $newComment, 1, $this->mTitle->userIsWatching(), $bot );
+               $flags = EDIT_UPDATE | EDIT_MINOR;
+               if($bot)
+                       $flags |= EDIT_FORCE_BOT;
+               if(!$this->doEdit( $target->getText(), $newComment, $flags))
+                       ;       # todo: this error case has not been handled? Use db transactions?
 
                $wgOut->returnToMain( false );
        }